package com.neo.web;

import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;

import com.neo.config.websocket.messege.RequestMessage;
import com.neo.config.websocket.messege.ResponseMessage;

/** 
 * @Title: WsController.java 
 * @author 杨大锤 E-mail: 
 * @class WsController
 * @date 创建时间：2017年4月17日 下午12:00:45 
 * 
*/
@Controller
public class WsController {
    @MessageMapping("/welcome")
    @SendTo("/topic/getResponse")
    public ResponseMessage say(RequestMessage message) {
        System.out.println(message.getName());
        return new ResponseMessage("welcome," + message.getName() + " !");
    }
}
